package c.h.a.n0;

import android.content.SharedPreferences;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import c.b.a.a.a;
import c.h.a.b0.l;
import c.h.a.m0.i;
import com.liuzh.deviceinfo.settings.SettingsActivity;
import com.liuzh.deviceinfo.view.SettingsItemView;
import com.liuzh.deviceinfo.view.SettingsItemView.b;
import java.util.Objects;

/* compiled from: lambda */
public final /* synthetic */ class d implements OnCheckedChangeListener {
    public final /* synthetic */ SettingsItemView a;
    public final /* synthetic */ String b;

    public /* synthetic */ d(SettingsItemView settingsItemView, String str) {
        this.a = settingsItemView;
        this.b = str;
    }

    public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
        SettingsItemView settingsItemView = this.a;
        String str = this.b;
        Objects.requireNonNull(settingsItemView);
        i iVar = i.a;
        iVar = i.a;
        SharedPreferences sharedPreferences = i.b;
        a.p(sharedPreferences, str, z);
        b bVar = settingsItemView.x;
        if (bVar != null) {
            SettingsActivity settingsActivity = ((c.h.a.i0.a) bVar).a;
            Objects.requireNonNull(settingsActivity);
            if (z && i.a()) {
                new l(settingsActivity).b();
                sharedPreferences.edit().putBoolean("close_ad_show_donate", false).apply();
            }
        }
    }
}
